

##############################################################################
################################## Models ####################################
##############################################################################

### Model 1
model1 <-ergm(model.info.net ~ edges +  gwesp(alpha=0.7, fixed=T) + gwdsp(alpha=0.2, fixed=F)
                     + nodecov("betweenness.info.net.")
                     + nodecov("resources.cat") 
                     + nodefactor("implementer")
                     + edgecov(pol.mat, attrname="pol.pref") 
                     + edgecov(rep.mat, attrname="joint.reporting") 
                     + edgecov(col.mat, attrname="collaborating")
                     + nodematch('organization.type', diff=T, keep=c(1,2,4)))

summary(model1)
mcmc.diagnostics(model1)
model1.gof <- gof(model1, GOF = ~distance + espartners + degree + triadcensus)
op<-par(mfrow=c(2,2))
plot(model1.gof) 
par(op)
print(model1$mle.lik)

### Model 2
model2 <-ergm(model.info.net ~ edges +  gwesp(alpha=0.7, fixed=T) + gwdsp(alpha=0.2, fixed=F)
                     + nodecov("betweenness.info.net.")
                     + nodecov("resources.cat") 
                     + nodefactor("implementer")
                     + edgecov(pol.mat, attrname="pol.pref") 
                     + edgecov(rep.mat, attrname="joint.reporting") 
                     + edgecov(col.mat, attrname="collaborating")
                     + nodematch('organization.type', diff=T, keep=c(1,2,4))
                     + nodematch('nat.eu.int', diff=T,keep=c(1,2)))

summary(model2)
mcmc.diagnostics(model2)
model2.gof <- gof(model2, GOF = ~distance + espartners + degree + triadcensus)
op<-par(mfrow=c(2,2))
plot(model2.gof) 
par(op)
print(model2$mle.lik)